package com.wy.dao;

import com.wy.bean.FeeBean;
import com.wy.model.sys.FeeRule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FeeRuleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FeeRule record);

    int insertSelective(FeeRule record);

    FeeBean selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(FeeBean record);

    int updateByPrimaryKey(FeeBean record);

    int insertFeeBean(FeeBean feeBean);

    List<FeeBean> feeRuleList(@Param("pageSize")Integer pageSize, @Param("start")Integer start,
                              @Param("residenceId")Integer residenceId, @Param("feeName")String feeName,@Param("feeType")String feeType, @Param("rids")List<String> rids);

    Integer feeRuleSize(@Param("pageSize")Integer pageSize, @Param("start")Integer start,
                        @Param("residenceId")Integer residenceId, @Param("feeName")String feeName,@Param("feeType")String feeType, @Param("rids")List<String> rids);

    void deleteFeeRule(@Param("groupId")List<String> groupId);

    /**
     * 根据小区名称获取有效的费用规则
     * @param residenceId
     * @return
     */
    List<FeeBean> getFeeRuleByResidenceId(@Param("residenceId")Integer residenceId);

    List<FeeBean> getFeeRuleByTime(String today);

}